<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <link href="/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css"/>
    <link href="/h-ui.admin/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css"/>

    <title>VB作业自动评阅系统 教师端</title>
</head>
<body>
<div class="head">
    <div><h2 style="display:inline-block;">VB作业自动评阅系统</h2>Beta</div>
    <div style="display: inline-block; padding:1px 2px 0 2px; border: 1px solid; border-radius: 5px">&nbsp 教师端 &nbsp
    </div>
</div>
<style>
    .head {
        width: 90%;
        text-align: center;
        line-height: 20px;
        padding: 5%;
        position: absolute;
    }
</style>
<div class="loginWraper">
    <div id="loginform" class="loginBox">
        <form class="form form-horizontal" action="" method="post">
            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
                <div class="formControls col-xs-8">
                    <input id="user" name="" type="text" placeholder="账户" class="input-text size-L">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
                <div class="formControls col-xs-8">
                    <input id="pwd" name="" type="password" placeholder="密码" class="input-text size-L">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe728;</i></label>
                <div class="formControls col-xs-8">
                    <input id='inputCaptcha' class="input-text size-L" type="text" placeholder="验证码"
                           onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:" style="width:150px;">
                    <img id="captcha" onclick="changeCaptcha()"> <a href="javascript:changeCaptcha()">看不清，换一张</a></div>
            </div>
            <#--<div class="row cl">-->
            <#--<div class="formControls col-xs-8 col-xs-offset-3">-->
            <#--<label for="online">-->
            <#--<input type="checkbox" name="online" id="online" value="">-->
            <#--使我保持登录状态</label>-->
            <#--</div>-->
            <#--</div>-->
            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-2">
                    <input id="loginBtn" type="button" style="width: 105%;" class="btn btn-success size-L"
                           value="登&nbsp;&nbsp;&nbsp;&nbsp;录">
                </div>
            </div>
        </form>
    </div>
</div>
<div class="footer">Copyright WuZhe</div>
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/js/vb-ajax.js"></script>
<script>
    var changeCaptcha = function () {
        $('#captcha').attr('src', '/captcha/get?f=' + Math.random());
    };
    $(function () {
        changeCaptcha();
        $("#loginBtn").on("click", function () {
            stupidAjaxGetJson(
                '/adm/login',
                'POST',
                {account: $("#user").val(), password: $("#pwd").val(), captcha: $("#inputCaptcha").val()},
                function (data) {
                    if (!data.success) {
                        alert(data.msg);
                        changeCaptcha();
                    } else {
                        alert(data.msg);
                        window.location = "/adm/";
                    }
                }
            )
        })
    });
</script>
</body>
</html>